home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 4: GNU Archives / Linux Cubed Series 4 - GNU Archives.iso / gnu / gawk-3.000 / gawk-3 / gawk-3.0.0 / vms / redirect.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-12-19  |  2.5 KB  |  79 lines

  1. /*
  2.  * redirect.h --- definitions for functions that are OS specific.
  3.  */
  4.  
  5. /* 
  6.  * Copyright (C) 1986, 88, 89, 91-93, 1995 the Free Software Foundation, Inc.
  7.  * 
  8.  * This file is part of GAWK, the GNU implementation of the
  9.  * AWK Programming Language.
  10.  * 
  11.  * GAWK is free software; you can redistribute it and/or modify
  12.  * it under the terms of the GNU General Public License as published by
  13.  * the Free Software Foundation; either version 2 of the License, or
  14.  * (at your option) any later version.
  15.  * 
  16.  * GAWK is distributed in the hope that it will be useful,
  17.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  18.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  19.  * GNU General Public License for more details.
  20.  * 
  21.  * You should have received a copy of the GNU General Public License
  22.  * along with this program; if not, write to the Free Software
  23.  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA
  24.  */
  25.  
  26. /* This file is included by custom.h for VMS-POSIX, or first
  27.    by config.h (vms-conf.h) then again by awk.h for normal VMS.  */
  28.  
  29. #if defined(VMS_POSIX) || defined(IN_CONFIG_H)
  30.  
  31. #define DEFAULT_FILETYPE ".awk"
  32.  
  33. /* some macros to redirect some non-VMS-specific code */
  34. #define getopt        gnu_getopt
  35. #define opterr        gnu_opterr
  36. #define optarg        gnu_optarg
  37. #define optind        gnu_optind
  38. #define optopt        gnu_optopt
  39. #define regcomp        gnu_regcomp
  40. #define regexec        gnu_regexec
  41. #define regfree        gnu_regfree
  42. #define regerror    gnu_regerror
  43.  
  44. #else    /* awk.h, not POSIX */
  45.  
  46. /* some macros to redirect to code in vms/vms_misc.c */
  47. #define exit        vms_exit
  48. #define open        vms_open
  49. #define strerror    vms_strerror
  50. #define strdup        vms_strdup
  51. extern void  exit P((int));
  52. extern int   open P((const char *,int,...));
  53. extern char *strerror P((int));
  54. extern char *strdup P((const char *str));
  55. extern int   vms_devopen P((const char *,int));
  56. # ifndef NO_TTY_FWRITE
  57. #define fwrite        tty_fwrite
  58. #define fclose        tty_fclose
  59. extern size_t fwrite P((const void *,size_t,size_t,FILE *));
  60. extern int    fclose P((FILE *));
  61. # endif
  62. extern FILE *popen P((const char *,const char *));
  63. extern int   pclose P((FILE *));
  64. extern void vms_arg_fixup P((int *,char ***));
  65. /* some things not in STDC_HEADERS */
  66. extern size_t gnu_strftime P((char *,size_t,const char *,const struct tm *));
  67. extern int unlink P((const char *));
  68. extern int getopt P((int,char **,char *));
  69. extern int isatty P((int));
  70. #ifndef fileno
  71. extern int fileno P((FILE *));
  72. #endif
  73. extern int close(), dup(), dup2(), fstat(), read(), stat();
  74. extern int getpgrp P((void));
  75.  
  76. #endif    /* not VMS_POSIX and not IN_CONFIG_H */
  77.  
  78. /*vms/redirect.h*/
  79.